if(!jsx3.lang.Class.forName("tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfig")) {
    tibco.admin.Main.loadResource("tibco/admin/enterpriseAssets/servers/loggingconfig/jss/jss.xml", "tibco.admin", "jssloggingserviceconfig99", "ljss", false);
    /**
     * Machines
     */
    jsx3.lang.Package.definePackage("tibco.admin.enterpriseAssets.servers.loggingconfig", function (loggingconfig) {
    });

    /**
     * Machines
     */
    jsx3.lang.Class.defineClass("tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfig",
            jsx3.lang.Object,
            [tibco.admin.enterpriseAssets.servers.LeftNavInterface],
            function (LoggingConfig) {
				
				LoggingConfig.SOAP_CONFIG_REQUEST = "xmlns:jsx1=\"http://tibco.com/commonlogging/logserviceconfig\"";
				LoggingConfig.SOAP_CONFIG_RESPONSE = "xmlns:ns1=\"http://tibco.com/commonlogging/logserviceconfig\"";
				LoggingConfig.SOAP_CONFIG_NAMESPACE = "http://tibco.com/commonlogging/logserviceconfig";

                LoggingConfig.instance = null
                LoggingConfig.DESTINATION_NO = 0;
				LoggingConfig.DESTINATION_DB = 1;
				LoggingConfig.DESTINATION_FILE = 2;

				LoggingConfig.isCreateOperation = true;
				LoggingConfig.currentLogserviceId = "";
				LoggingConfig.currentLogserviceStatus = "";
				LoggingConfig.cdfJdbcSelectName = "configJDBCCatchId_CL";
                LoggingConfig.cdfEmsSelectName = "configJMSCatchId_CL";

              
				LoggingConfig.nodeInitConfigResponse = null;
				LoggingConfig.modelListCDF = null;

				var parentInstance = null;

                LoggingConfig.prototype.init = function() {
                    this.jsxsuper();
                }

                LoggingConfig.prototype.getNamespace = function() {
                    return "tibco.admin";
                }

                LoggingConfig.prototype.destroyPlugin = function() {
                }
				
				LoggingConfig.getServer = function() {
                    return  tibco.admin.Main.getServer();
                };

                LoggingConfig.getInstance = function(args) {
                    if(!this.instance) {
                        this.instance = new tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfig();
                    }
                    return this.instance;
                };
				
				LoggingConfig.prototype.loadComponent = function(parent) {
					parentInstance = parent;
					
					tibco.admin.Main.loadUIResource(parent, this.getNamespace(), "tibco/admin/enterpriseAssets/servers/loggingconfig/components/logserviceManagement.xml", true);
					tibco.admin.Main.loadUIResource(parentInstance, this.getNamespace(), "tibco/admin/enterpriseAssets/servers/loggingconfig/components/logserviceConfig.xml", true);
					tibco.admin.Main.loadUIResource(parentInstance, this.getNamespace(), "tibco/admin/enterpriseAssets/servers/loggingconfig/components/logserviceConfigView.xml", true);

                    if(!tibco.admin.enterpriseAssets.servers.loggingconfig || !tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfigService) {
                        tibco.admin.Main.loadClass("tibco/admin/enterpriseAssets/servers/loggingconfig/LoggingConfigService.js", this.getNamespace());
                        var me = this;
                        tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfigService.handler = me;
                    }
                    
					LoggingConfig.setUIExteralStrings();
					LoggingConfig.refreshManagement();
					tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfigService.callallModelList();
                };


				
				LoggingConfig.onClickCancelButton = function() {
					if(LoggingConfig.isCreateOperation){
						LoggingConfig.onClickBackButton();
					}else{
						LoggingConfig.swithToViewMode();
					}
					
				}


				LoggingConfig.onClickCreateButton = function() {
					tibco.admin.Main.getServer().getJSXByName("mgtMain_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
					tibco.admin.Main.getServer().getJSXByName("cfgMain_CL").setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);
					tibco.admin.Main.getServer().getJSXByName("cfgViewMain_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
					
					tibco.admin.Main.getServer().getJSXByName("selConfigLogserviceName_CL").setEnabled(jsx3.gui.Form.STATEENABLED ,true);
					
					//clear value for each fields
					LoggingConfig.clearFields();
					
					LoggingConfig.initSelectModelList(null);		

					LoggingConfig.isCreateOperation = true;
				};

				LoggingConfig.clearFields = function() {

					LoggingConfig.updateSelect (0 , 0);

					tibco.admin.Main.getServer().getJSXByName("selConfigLogserviceName_CL").setValue("");												
					tibco.admin.Main.getServer().getJSXByName("selConfigQueue_CL").setValue("");
					tibco.admin.Main.getServer().getJSXByName("selConfigFile_CL").setValue("");
					tibco.admin.Main.getServer().getJSXByName("selConfigDestNo_CL").setGroupValue("0");

					LoggingConfig.switchToDestination( tibco.admin.Main.getServer().getJSXByName("selConfigDestNo_CL") );				
						
					tibco.admin.Main.getServer().getJSXByName("selConfigMaxSize_CL").setValue(4);
					tibco.admin.Main.getServer().getJSXByName("selConfigMaxIndex_CL").setValue(2);
				}

				LoggingConfig.onClickModifyButton = function() {
					//close manage page, display config page
					tibco.admin.Main.getServer().getJSXByName("mgtMain_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
					tibco.admin.Main.getServer().getJSXByName("cfgMain_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
					tibco.admin.Main.getServer().getJSXByName("cfgViewMain_CL").setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);
					//end

				
					tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfigService.callinitConfig();		
					
					LoggingConfig.isCreateOperation = false;
				};
				
				LoggingConfig.onClickDeleteButton = function() {
					if(LoggingConfig.currentLogserviceStatus == "Running"){
						tibco.admin.Main.confirm(
							LoggingConfig.getExternalString("msgDeleteConfirmTitle_CL"),
							LoggingConfig.getExternalString("msgDeleteConfirmMessage_CL"),							
							function(dialog){
								dialog.doClose(); 
								tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfigService.calldeleteLogservice();
							}
						)

					}else{
						tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfigService.calldeleteLogservice();
					}
				};

				LoggingConfig.onClickStartButton = function() {
					tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfigService.callstartLogservice();		
					//invoke web service to start log service
				};

				LoggingConfig.onClickStopButton = function() {
					tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfigService.callstopLogservice();		
					//invoke web service to stop log service
				};

				LoggingConfig.getCurrentLogserviceId = function(Matrix){					
					LoggingConfig.currentLogserviceId = Matrix.getSelectedNodes().getItem(0).getAttribute("jsxid");		
					LoggingConfig.currentLogserviceStatus = Matrix.getSelectedNodes().getItem(0).getAttribute("jsxstatus");

					tibco.admin.Main.getServer().getJSXByName("buttonMgtDelete_CL").setEnabled(jsx3.gui.Form.STATEENABLED ,true);
					tibco.admin.Main.getServer().getJSXByName("buttonMgtModify_CL").setEnabled(jsx3.gui.Form.STATEENABLED ,true);
					
					LoggingConfig.setDefaultButton(Matrix.getSelectedNodes().getItem(0).getAttribute("jsxdefault"));
					LoggingConfig.setStatusButton(Matrix.getSelectedNodes().getItem(0).getAttribute("jsxstatus"));

					return LoggingConfig.currentLogserviceId;
					
				};
					
				LoggingConfig.setDefaultButton = function(isDefaultFlag) {

					if(isDefaultFlag == "Yes"){
						tibco.admin.Main.getServer().getJSXByName("buttonMgtSetDefault_CL").setEnabled(jsx3.gui.Form.STATEDISABLED ,true);
					}else{
						tibco.admin.Main.getServer().getJSXByName("buttonMgtSetDefault_CL").setEnabled(jsx3.gui.Form.STATEENABLED ,true);
					}
				}

				LoggingConfig.setStatusButton = function(statusFlag) {
					if(statusFlag == "Running"){
						tibco.admin.Main.getServer().getJSXByName("buttonMgtStart_CL").setEnabled(jsx3.gui.Form.STATEDISABLED ,true);
						tibco.admin.Main.getServer().getJSXByName("buttonMgtStop_CL").setEnabled(jsx3.gui.Form.STATEENABLED ,true);
					}else{
						tibco.admin.Main.getServer().getJSXByName("buttonMgtStart_CL").setEnabled(jsx3.gui.Form.STATEENABLED ,true);
						tibco.admin.Main.getServer().getJSXByName("buttonMgtStop_CL").setEnabled(jsx3.gui.Form.STATEDISABLED ,true);
					}
				}

				LoggingConfig.onClickSetDefaultButton = function() {					
					tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfigService.callsetDefaultLogservice();		
					
				};

				LoggingConfig.onClickSaveButton = function() {
					var isValid = true;
					var logserviceName = tibco.admin.Main.getServer().getJSXByName("selConfigLogserviceName_CL").getValue();
					var jmsid = tibco.admin.Main.getServer().getJSXByName("selConfigJMS_CL").getValue();
					var jmsName = tibco.admin.Main.getServer().getJSXByName("selConfigJMS_CL").getText();
					var queueName = tibco.admin.Main.getServer().getJSXByName("selConfigQueue_CL").getValue();
					var destination = tibco.admin.Main.getServer().getJSXByName("selConfigDestNo_CL").getGroupValue();
					var doc = tibco.admin.Main.getServer().getCache().getDocument("listMgtLogServiceCatchId_CL");
					
					//logserivce name check, 1:not null, 2:not duplicated 
					if(logserviceName == null || logserviceName.trim() == ""){
						LoggingConfig.printFormatMessage("msgCheckServErrTitle","msgCheckServNameErrMsg");
						isValid = false;
						return;
					}else{
						if(!LoggingConfig.checkString(logserviceName,"Name") ){
							isValid = false;
							return;
						}
					}

					if(LoggingConfig.isCreateOperation){
						var jsxid = doc.selectSingleNode(".//record[@jsxid='"+ logserviceName +"']"); 
						if(jsxid != null && jsxid != ""){
							LoggingConfig.printFormatMessage("msgCheckServErrTitle","msgCheckServNameDupErrMsg");							
							isValid = false;
							return;
						}
					}
					
					//jms id check, 1: not null, 2: not duplicated with queuename
					if(jmsid == 0){
						LoggingConfig.printFormatMessage("msgCheckServErrTitle","msgCheckServJMSErrMsg");	
						isValid = false;
						return;
					}
					if(queueName == null || queueName.trim() == ""){
						LoggingConfig.printFormatMessage("msgCheckServErrTitle","msgCheckServJMSQueueErrMsg");	
						isValid = false;
						return;
					}else{
						if(!LoggingConfig.checkString(queueName,"Queue Name") ){
							isValid = false;
							return;
						}
					}

					if(LoggingConfig.isCreateOperation){
						var jsxjmsqueue = doc.selectNodes(".//record[@jsxjms='"+ jmsName +"']");								
						if(jsxjmsqueue != null){
							var index = jsxjmsqueue.getLength();
							for(var i=0; i<index ;i++){
								var jsxqueue = jsxjmsqueue.get(i).getAttribute("jsxqueue");							
								if(jsxqueue != null && jsxqueue == queueName){
									LoggingConfig.printFormatMessage("msgCheckServErrTitle","msgCheckServJMSDupErrMsg");	
									isValid = false;
									return;
								}
							}				
						}
					}
					
					//db check 
					if(destination == LoggingConfig.DESTINATION_DB){
						var jdbc = tibco.admin.Main.getServer().getJSXByName("selConfigJDBC_CL").getValue();
						if(jdbc ==null || jdbc.trim() == "" || jdbc == 0){
							LoggingConfig.printFormatMessage("msgCheckServErrTitle","msgCheckServJDBCErrMsg");	
							return;								
						}
					}

					//file name check
					if(destination == LoggingConfig.DESTINATION_FILE){
						var file = tibco.admin.Main.getServer().getJSXByName("selConfigFile_CL").getValue();
						if(file == null || file.trim() == ""){
							LoggingConfig.printFormatMessage("msgCheckServErrTitle","msgCheckServFileErrMsg");	
							return;
						}else{
							if(!LoggingConfig.checkString(file,"File") ){
								isValid = false;
								return;
							}
						}						

						var maxSize = tibco.admin.Main.getServer().getJSXByName("selConfigMaxSize_CL").getValue();
						if(!LoggingConfig.checkNumber(maxSize)){
							isValid = false;
							return;
						}
						if(maxSize==0){
							isValid = false;
							LoggingConfig.printFormatMessage("msgCheckServErrTitle","msgCheckServMaxSizeErrMsg");	
							return;
						}

						var maxIndex = tibco.admin.Main.getServer().getJSXByName("selConfigMaxIndex_CL").getValue();
						if(!LoggingConfig.checkNumber(maxIndex)){
							isValid = false;
							return;
						}
						if(maxIndex==0){
							isValid = false;
							LoggingConfig.printFormatMessage("msgCheckServErrTitle","msgCheckServMaxIndexErrMsg");	
							return;
						}
					}
					

					

					//model name check
					var cache = LoggingConfig.getServer().getCache().getDocument("configModelCatchId_CL"); 
					var records = cache.selectNodes(".//record"); 
					if(records.getLength() < 1){
						LoggingConfig.printFormatMessage("msgCheckServErrTitle","msgCheckServModelErrMsg");	
						isValid = false;
						return;
					}

					if(isValid){
						tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfigService.callupdateConfig();
						LoggingConfig.refreshConfig();
						this.getInstance().endEditMode();
					}					

				};

				LoggingConfig.onClickBackButton = function() {
			
					var manageMain = tibco.admin.Main.getServer().getJSXByName("mgtMain_CL");
					var configMain = tibco.admin.Main.getServer().getJSXByName("cfgMain_CL");

					configMain.setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
					manageMain.setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);

					//close save,cancel button
					tibco.admin.Main.getServer().getJSXByName("buttonCfgEdit_CL").setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);
					tibco.admin.Main.getServer().getJSXByName("buttonCfgSave_CL").setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);
					tibco.admin.Main.getServer().getJSXByName("buttonCfgCancel_CL").setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);
					//end 
				};

                
                LoggingConfig.prototype.getLeftText = function() {
                    return tibco.admin.Main.getServer().getDynamicProperty("@lblPaneTitle_LGC99");
                };

               

				LoggingConfig.switchToDestination = function(RadioButton) {
					var selConfigJDBC_CL = LoggingConfig.getServer().getJSXByName("selConfigJDBC_CL");
					var selConfigFile_CL = LoggingConfig.getServer().getJSXByName("selConfigFile_CL");
					var selConfigMaxSize_CL = LoggingConfig.getServer().getJSXByName("selConfigMaxSize_CL");
					var selConfigMaxIndex_CL = LoggingConfig.getServer().getJSXByName("selConfigMaxIndex_CL");

					if(RadioButton.getValue() == "0"){
						selConfigJDBC_CL.setEnabled(jsx3.gui.Form.STATEDISABLED,true);
						selConfigFile_CL.setEnabled(jsx3.gui.Form.STATEDISABLED ,true);
						selConfigMaxSize_CL.setEnabled(jsx3.gui.Form.STATEDISABLED ,true);
						selConfigMaxIndex_CL.setEnabled(jsx3.gui.Form.STATEDISABLED ,true);
					}else if(RadioButton.getValue() == "1"){
						selConfigJDBC_CL.setEnabled(jsx3.gui.Form.STATEENABLED ,true);
						selConfigFile_CL.setEnabled(jsx3.gui.Form.STATEDISABLED ,true);
						selConfigMaxSize_CL.setEnabled(jsx3.gui.Form.STATEDISABLED ,true);
						selConfigMaxIndex_CL.setEnabled(jsx3.gui.Form.STATEDISABLED ,true);
					}else if(RadioButton.getValue() == "2"){
						selConfigJDBC_CL.setEnabled(jsx3.gui.Form.STATEDISABLED ,true);
						selConfigFile_CL.setEnabled(jsx3.gui.Form.STATEENABLED ,true);
						selConfigMaxSize_CL.setEnabled(jsx3.gui.Form.STATEENABLED ,true);
						selConfigMaxIndex_CL.setEnabled(jsx3.gui.Form.STATEENABLED ,true);
					}
					return true;					
				};
			
			
				LoggingConfig.selectedModelName = function() {	
					var orgConfigModelCatchId_CL = tibco.admin.Main.getServer().getCache().getDocument("orgConfigModelCatchId_CL");
					var valueModelList = tibco.admin.Main.getServer().getJSXByName("orgValueConfigModel_CL");					
					var nodeSelected = valueModelList.getSelectedNodes();  
					for(var i=0;i<nodeSelected.getLength();i++){
						var jsxidSelected = nodeSelected.getItem(i).getAttribute("jsxid");
						var jsxtextSelected = nodeSelected.getItem(i).getAttribute("jsxtext");
						var modelSelected = tibco.admin.Main.getServer().getCache().getDocument("configModelCatchId_CL");					
						var removeModel = orgConfigModelCatchId_CL.selectSingleNode("//record[@jsxid='"+ jsxidSelected +"']");
				
						if(removeModel != null){
							//remove child from modellist
							orgConfigModelCatchId_CL.removeChild(removeModel);								

							//set child to new modellist
							var newRecordNode = modelSelected.createNode(jsx3.xml.Entity.TYPEELEMENT, "record");
							newRecordNode.setAttribute("jsxid", jsxidSelected);
							newRecordNode.setAttribute("jsxtext", jsxtextSelected);	
							modelSelected.appendChild(newRecordNode);
							
						}
					}
					tibco.admin.Main.getServer().getJSXByName("orgValueConfigModel_CL").repaint();
					tibco.admin.Main.getServer().getJSXByName("valueConfigModel_CL").repaint();
										
				};
				
				LoggingConfig.removedModelName = function() {
					var orgConfigModelCatchId_CL = tibco.admin.Main.getServer().getCache().getDocument("configModelCatchId_CL");
					var valueModelList = tibco.admin.Main.getServer().getJSXByName("valueConfigModel_CL");					
					var nodeSelected = valueModelList.getSelectedNodes();  
					for(var i=0;i<nodeSelected.getLength();i++){
						var jsxidSelected = nodeSelected.getItem(i).getAttribute("jsxid");
						var jsxtextSelected = nodeSelected.getItem(i).getAttribute("jsxtext");
						var modelSelected = tibco.admin.Main.getServer().getCache().getDocument("orgConfigModelCatchId_CL");					
						var removeModel = orgConfigModelCatchId_CL.selectSingleNode("//record[@jsxid='"+ jsxidSelected +"']");
				
						if(removeModel != null){
							//remove child from modellist
							orgConfigModelCatchId_CL.removeChild(removeModel);								

							//set child to new modellist
							var newRecordNode = modelSelected.createNode(jsx3.xml.Entity.TYPEELEMENT, "record");
							newRecordNode.setAttribute("jsxid", jsxidSelected);
							newRecordNode.setAttribute("jsxtext", jsxtextSelected);	
							modelSelected.appendChild(newRecordNode);
							
						}
					}
					tibco.admin.Main.getServer().getJSXByName("orgValueConfigModel_CL").repaint();
					tibco.admin.Main.getServer().getJSXByName("valueConfigModel_CL").repaint();
				};

                LoggingConfig.swithToEditMode = function() {
                    try {
                        this.getInstance().beginEditMode();

						LoggingConfig.clearFields();
						
						tibco.admin.Main.getServer().getJSXByName("mgtMain_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
					    tibco.admin.Main.getServer().getJSXByName("cfgMain_CL").setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);
					    tibco.admin.Main.getServer().getJSXByName("cfgViewMain_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);

						tibco.admin.Main.getServer().getJSXByName("selConfigLogserviceName_CL").setEnabled(jsx3.gui.Form.STATEDISABLED ,true);
								
						//set value for each activity
						var name = LoggingConfig.nodeInitConfigResponse.selectSingleNode(".//ns1:logserviceName",LoggingConfig.SOAP_CONFIG_RESPONSE);
						tibco.admin.Main.getServer().getJSXByName("selConfigLogserviceName_CL").setValue(name.getValue());
												
						var queueName = LoggingConfig.nodeInitConfigResponse.selectSingleNode(".//ns1:queueName",LoggingConfig.SOAP_CONFIG_RESPONSE);
						tibco.admin.Main.getServer().getJSXByName("selConfigQueue_CL").setValue(queueName.getValue());

						var destination = LoggingConfig.nodeInitConfigResponse.selectSingleNode(".//ns1:destination",LoggingConfig.SOAP_CONFIG_RESPONSE);
						tibco.admin.Main.getServer().getJSXByName("selConfigDestNo_CL").setGroupValue(destination.getValue());

						LoggingConfig.switchToDestination(destination);
					
						var jmsId = LoggingConfig.nodeInitConfigResponse.selectSingleNode(".//ns1:jmsid",LoggingConfig.SOAP_CONFIG_RESPONSE);
						var jdbcId = LoggingConfig.nodeInitConfigResponse.selectSingleNode(".//ns1:jdbcid",LoggingConfig.SOAP_CONFIG_RESPONSE);
						
						if(jdbcId == null){
							jdbcId =0;
						}else{
							jdbcId = jdbcId.getValue();
						}

						if(jmsId == null){
							jmsId=0;
						}else{
							jmsId = jmsId.getValue();
						}

						LoggingConfig.updateSelect (jdbcId , jmsId);
						
						if(destination.getValue() == 2){							
							var file = LoggingConfig.nodeInitConfigResponse.selectSingleNode(".//ns1:fileName",LoggingConfig.SOAP_CONFIG_RESPONSE);
							tibco.admin.Main.getServer().getJSXByName("selConfigFile_CL").setValue(file.getValue());	

							var size = LoggingConfig.nodeInitConfigResponse.selectSingleNode(".//ns1:maxSize",LoggingConfig.SOAP_CONFIG_RESPONSE);
							tibco.admin.Main.getServer().getJSXByName("selConfigMaxSize_CL").setValue(size.getValue());

							var index = LoggingConfig.nodeInitConfigResponse.selectSingleNode(".//ns1:maxIndex",LoggingConfig.SOAP_CONFIG_RESPONSE);
							tibco.admin.Main.getServer().getJSXByName("selConfigMaxIndex_CL").setValue(index.getValue());
						}
						
						var modelList = LoggingConfig.nodeInitConfigResponse.selectSingleNode(".//ns1:modelList",LoggingConfig.SOAP_CONFIG_RESPONSE);	
						LoggingConfig.initSelectModelList(modelList);
						
						tibco.admin.Main.getServer().getJSXByName("cfgMain_CL").repaint();
						//end
						
					
                    }
                    catch(ex) {
                        jsx3.log(ex);
                        tibco.admin.Main.logException(ex);
                    }
                };

                LoggingConfig.swithToViewMode = function() {
                  this.getInstance().endEditMode();
				  //close manage page, display config page
					tibco.admin.Main.getServer().getJSXByName("mgtMain_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
					tibco.admin.Main.getServer().getJSXByName("cfgMain_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
					tibco.admin.Main.getServer().getJSXByName("cfgViewMain_CL").setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);
					//end

					                  
                };
				
				LoggingConfig.initSelectModelList = function(modelSelectedList){
					var modelUnSelectedCDF = new jsx3.xml.Document().loadXML("<data jsxid=\"jsxroot\">"+ LoggingConfig.modelListCDF +"</data>");						 
					var modelSelectedCDF = new jsx3.xml.Document().loadXML("<data jsxid=\"jsxroot\"></data>");

					if(modelSelectedList != null){
						var jsxtextSelected = "";
						var records = modelSelectedList.selectNodes(".//ns1:modelName",LoggingConfig.SOAP_CONFIG_RESPONSE);
	
						for(var i = 0; i < records.getLength(); i++){
							jsxtextSelected = records.get(i).getValue() ;
							var removeModel = modelUnSelectedCDF.selectSingleNode("//record[@jsxtext='"+ jsxtextSelected +"']");

							if(removeModel != null){
								//remove child from left
								modelUnSelectedCDF.removeChild(removeModel);
								//set child to right
								modelSelectedCDF.appendChild(removeModel);
							}
						}						
					}

					tibco.admin.Main.getServer().getCache().setDocument("orgConfigModelCatchId_CL",modelUnSelectedCDF);
					tibco.admin.Main.getServer().getJSXByName("orgValueConfigModel_CL").repaint();

					tibco.admin.Main.getServer().getCache().setDocument("configModelCatchId_CL",modelSelectedCDF);
					tibco.admin.Main.getServer().getJSXByName("valueConfigModel_CL").repaint();
				};
				
                LoggingConfig.initConfigResponse = function(nodeInitConfigResponse) {
					LoggingConfig.nodeInitConfigResponse = nodeInitConfigResponse;
                    //jms shared resource
					var emsName = nodeInitConfigResponse.selectSingleNode(".//ns1:jmsName",LoggingConfig.SOAP_CONFIG_RESPONSE);
					var emsNameText = emsName.getValue();

					if(emsNameText == null || emsNameText.trim() == ""){
						emsNameText = LoggingConfig.getExternalString("labTxtJMSInvalid_CL");
						tibco.admin.Main.getServer().getJSXByName("txtConfigJMS_CL").setText(emsNameText);						
					}else{
						tibco.admin.Main.getServer().getJSXByName("txtConfigJMS_CL").setText(emsNameText);						
					}										
					//destination
					
					var destination = nodeInitConfigResponse.selectSingleNode(".//ns1:destination",LoggingConfig.SOAP_CONFIG_RESPONSE);
					if(destination.getValue() == 0){
						tibco.admin.Main.getServer().getJSXByName("labelConfigMaxSize_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
						tibco.admin.Main.getServer().getJSXByName("labelConfigMaxSize2_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
						tibco.admin.Main.getServer().getJSXByName("labelConfigMaxIndex_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
						tibco.admin.Main.getServer().getJSXByName("txtConfigMaxIndex_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
						tibco.admin.Main.getServer().getJSXByName("txtConfigMaxSize_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);

						tibco.admin.Main.getServer().getJSXByName("txtConfigDest_CL").setText(LoggingConfig.getExternalString("labTxtDestInvalid_CL"));
					}else if(destination.getValue() == 1){
						tibco.admin.Main.getServer().getJSXByName("labelConfigMaxSize_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
						tibco.admin.Main.getServer().getJSXByName("labelConfigMaxSize2_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
						tibco.admin.Main.getServer().getJSXByName("labelConfigMaxIndex_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
						tibco.admin.Main.getServer().getJSXByName("txtConfigMaxIndex_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
						tibco.admin.Main.getServer().getJSXByName("txtConfigMaxSize_CL").setDisplay(jsx3.gui.Block.DISPLAYNONE,true);

						var destValue = nodeInitConfigResponse.selectSingleNode(".//ns1:jdbcName",LoggingConfig.SOAP_CONFIG_RESPONSE);
						tibco.admin.Main.getServer().getJSXByName("txtConfigDest_CL").setText(destValue.getValue());
					}else if(destination.getValue() == 2){
						var destValue = nodeInitConfigResponse.selectSingleNode(".//ns1:fileName",LoggingConfig.SOAP_CONFIG_RESPONSE);
						tibco.admin.Main.getServer().getJSXByName("txtConfigDest_CL").setText(destValue.getValue());
						
						var maxSize = nodeInitConfigResponse.selectSingleNode(".//ns1:maxSize",LoggingConfig.SOAP_CONFIG_RESPONSE);
						tibco.admin.Main.getServer().getJSXByName("txtConfigMaxSize_CL").setText(maxSize.getValue());

						var maxIndex = nodeInitConfigResponse.selectSingleNode(".//ns1:maxIndex",LoggingConfig.SOAP_CONFIG_RESPONSE);
						tibco.admin.Main.getServer().getJSXByName("txtConfigMaxIndex_CL").setText(maxIndex.getValue());

						//display max size and max index items
						tibco.admin.Main.getServer().getJSXByName("labelConfigMaxSize_CL").setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);
						tibco.admin.Main.getServer().getJSXByName("labelConfigMaxSize2_CL").setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);
						tibco.admin.Main.getServer().getJSXByName("labelConfigMaxIndex_CL").setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);
						tibco.admin.Main.getServer().getJSXByName("txtConfigMaxIndex_CL").setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);
						tibco.admin.Main.getServer().getJSXByName("txtConfigMaxSize_CL").setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);
					}

					//model list
					var modelList = nodeInitConfigResponse.selectSingleNode(".//ns1:modelList",LoggingConfig.SOAP_CONFIG_RESPONSE);
					if(modelList != null){
						var modelName = "";
						var records = modelList.selectNodes(".//ns1:modelName",LoggingConfig.SOAP_CONFIG_RESPONSE);

						for(var i = 0; i < records.getLength(); i++){
							if(i>0){
								modelName += ",";
							}
							modelName += records.get(i).getValue();
						}
						tibco.admin.Main.getServer().getJSXByName("txtConfigModel_CL").setText(modelName);
					}
					
					tibco.admin.Main.getServer().getJSXByName("cfgViewMain_CL").repaint();
					

                };

             
                LoggingConfig.updateSelect = function(selectedJdbcId, selectedEmsId) {		
					
                    var selJDBCName_LGC = LoggingConfig.getServer().getJSXByName("selConfigJDBC_CL");
                    var selEMSName_LGC = LoggingConfig.getServer().getJSXByName("selConfigJMS_CL");
                    var updatedJdbcId = null;
                    var updatedEmsId = null;

                    var cdfJdbcSelect = LoggingConfig.getServer().getCache().getDocument(LoggingConfig.cdfJdbcSelectName);
                    var nodeJdbcSelect = cdfJdbcSelect.selectSingleNode(".//record[@jsxid='" + selectedJdbcId + "']");
                    if(selectedJdbcId != "0" && nodeJdbcSelect != null)
                        updatedJdbcId = selectedJdbcId;
                    else
                        updatedJdbcId = "0";

                    if(selJDBCName_LGC != null) {
                        selJDBCName_LGC.setValue(updatedJdbcId);
                        selJDBCName_LGC.repaint();
                    }

                    var cdfEmsSelect = LoggingConfig.getServer().getCache().getDocument(LoggingConfig.cdfEmsSelectName);
                    var nodeEmsJdbcSelect = cdfEmsSelect.selectSingleNode(".//record[@jsxid='" + selectedEmsId + "']");
                    if(selectedEmsId != "0" && nodeEmsJdbcSelect != null)
                        updatedEmsId = selectedEmsId;
                    else
                        updatedEmsId = "0";

                    if(selEMSName_LGC != null) {
                        selEMSName_LGC.setValue(updatedEmsId);
                        selEMSName_LGC.repaint();
                    }                    

                };

                LoggingConfig.updateConfig = function() {
					
                    var selJDBCName_LGC = LoggingConfig.getServer().getJSXByName("selJDBCName_LGC");
                    var selEMSName_LGC = LoggingConfig.getServer().getJSXByName("selEMSName_LGC");
                    if(selEMSName_LGC.getValue()=="0"){
                    		   var msgNoEMSErrTitle = LoggingConfig.getExternalString("msgNoEMSErrTitle");
				      	       var msgNoEMSErrMsg = LoggingConfig.getExternalString("msgNoEMSErrMsg");
				               tibco.admin.Main.alert(msgNoEMSErrTitle,msgNoEMSErrMsg);
				               return;
                    }
                    //then we call the back-end again to get the config data
                   
                    selJDBCName_LGC.setEnabled(jsx3.gui.Form.STATEDISABLED, true);
                    selEMSName_LGC.setEnabled(jsx3.gui.Form.STATEDISABLED, true);
                    tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfigService.callupdateConfig();

                };
             
                LoggingConfig.getExternalString = function(strID) {
                    var strExternal = tibco.admin.Main.getServer().getDynamicProperty("@" + strID);
                    if(strExternal == null) {
                        tibco.admin.Main.loadResource("tibco/admin/enterpriseAssets/servers/loggingconfig/jss/jss.xml", "tibco.admin", "jssloggingserviceconfig99", "ljss", false);
                        strExternal = tibco.admin.Main.getServer().getDynamicProperty("@" + strID);
                    }
                    return strExternal;
                };

                LoggingConfig.setUIExteralStrings = function() {
                    var mgtMain_CL = tibco.admin.Main.getServer().getJSXByName("mgtMain_CL");

                    var lableMgtTitle_CL = mgtMain_CL.getDescendantOfName("lableMgtTitle_CL");
                    lableMgtTitle_CL.setText(LoggingConfig.getExternalString("labTxtMgtTitle_CL"), true);

					var labelMgtLogService_CL = mgtMain_CL.getDescendantOfName("labelMgtLogService_CL");
                    labelMgtLogService_CL.setText(LoggingConfig.getExternalString("labTxtMgtListId_CL"), true);

					var labelMgtJMS_CL = mgtMain_CL.getDescendantOfName("labelMgtJMS_CL");
                    labelMgtJMS_CL.setText(LoggingConfig.getExternalString("labTxtMgtListJMS_CL"), true);

					var labelMgtQueue_CL = mgtMain_CL.getDescendantOfName("labelMgtQueue_CL");
                    labelMgtQueue_CL.setText(LoggingConfig.getExternalString("labTxtMgtListQueue_CL"), true);

					var labelMgtDest_CL = mgtMain_CL.getDescendantOfName("labelMgtDest_CL");
                    labelMgtDest_CL.setText(LoggingConfig.getExternalString("labTxtMgtListDest_CL"), true);

					var labelMgtMsg_CL = mgtMain_CL.getDescendantOfName("labelMgtMsg_CL");
                    labelMgtMsg_CL.setText(LoggingConfig.getExternalString("labTxtMgtListMsg_CL"), true);

					var labelMgtDefault_CL = mgtMain_CL.getDescendantOfName("labelMgtDefault_CL");
                    labelMgtDefault_CL.setText(LoggingConfig.getExternalString("labTxtMgtListDefault_CL"), true);

					var labelMgtStatus_CL = mgtMain_CL.getDescendantOfName("labelMgtStatus_CL");
                    labelMgtStatus_CL.setText(LoggingConfig.getExternalString("labTxtMgtListStatus_CL"), true);
					
					var buttonMgtCreate_CL = mgtMain_CL.getDescendantOfName("buttonMgtCreate_CL");
                    buttonMgtCreate_CL.setText(LoggingConfig.getExternalString("BtnCreate_CL"), true);

					var buttonMgtModify_CL = mgtMain_CL.getDescendantOfName("buttonMgtModify_CL");
                    buttonMgtModify_CL.setText(LoggingConfig.getExternalString("BtnModify_CL"), true);

					var buttonMgtDelete_CL = mgtMain_CL.getDescendantOfName("buttonMgtDelete_CL");
                    buttonMgtDelete_CL.setText(LoggingConfig.getExternalString("BtnDelete_CL"), true);

					var buttonMgtStart_CL = mgtMain_CL.getDescendantOfName("buttonMgtStart_CL");
                    buttonMgtStart_CL.setText(LoggingConfig.getExternalString("BtnStart_CL"), true);

					var buttonMgtStop_CL = mgtMain_CL.getDescendantOfName("buttonMgtStop_CL");
                    buttonMgtStop_CL.setText(LoggingConfig.getExternalString("BtnStop_CL"), true);

					var buttonMgtSetDefault_CL = mgtMain_CL.getDescendantOfName("buttonMgtSetDefault_CL");
                    buttonMgtSetDefault_CL.setText(LoggingConfig.getExternalString("BtnSetDefault_CL"), true);
	

					/**-----config----*/
					var cfgMain_CL = tibco.admin.Main.getServer().getJSXByName("cfgMain_CL");

					var labelConfigLogserviceName_CL = cfgMain_CL.getDescendantOfName("labelConfigLogserviceName_CL");
                    labelConfigLogserviceName_CL.setText(LoggingConfig.getExternalString("labTxtCfgName_CL"), true);

					var labelConfigJMS_CL = cfgMain_CL.getDescendantOfName("labelConfigJMS_CL");
                    labelConfigJMS_CL.setText(LoggingConfig.getExternalString("labTxtCfgJMS_CL"), true);

					var labelConfigQueue_CL = cfgMain_CL.getDescendantOfName("labelConfigQueue_CL");
                    labelConfigQueue_CL.setText(LoggingConfig.getExternalString("labTxtCfgQueue_CL"), true);

					var labelConfigDest_CL = cfgMain_CL.getDescendantOfName("labelConfigDest_CL");
                    labelConfigDest_CL.setText(LoggingConfig.getExternalString("labTxtCfgDest_CL"), true);

					var selConfigDestNo_CL = cfgMain_CL.getDescendantOfName("selConfigDestNo_CL");
                    selConfigDestNo_CL.setText(LoggingConfig.getExternalString("labTxtDestDefault_CL"), true);

					var selConfigDestDB_CL = cfgMain_CL.getDescendantOfName("selConfigDestDB_CL");
                    selConfigDestDB_CL.setText(LoggingConfig.getExternalString("labTxtCfgDB_CL"), true);

					var selConfigDestFile_CL = cfgMain_CL.getDescendantOfName("selConfigDestFile_CL");
                    selConfigDestFile_CL.setText(LoggingConfig.getExternalString("labTxtCfgFile_CL"), true);

					var labelConfigMaxSize_CL = cfgMain_CL.getDescendantOfName("labelConfigMaxSize_CL");
                    labelConfigMaxSize_CL.setText(LoggingConfig.getExternalString("labTxtCfgMaxSize_CL"), true);

					var labelConfigMaxIndex_CL = cfgMain_CL.getDescendantOfName("labelConfigMaxIndex_CL");
                    labelConfigMaxIndex_CL.setText(LoggingConfig.getExternalString("labTxtCfgMaxIndex_CL"), true);

					var labelConfigModel_CL = cfgMain_CL.getDescendantOfName("labelConfigModel_CL");
                    labelConfigModel_CL.setText(LoggingConfig.getExternalString("labTxtCfgModel_CL"), true);
							
					var labelConfigModelSelected_CL = cfgMain_CL.getDescendantOfName("labelConfigModelSelected_CL");
                    labelConfigModelSelected_CL.setText(LoggingConfig.getExternalString("labTxtModelSelected_CL"), true);
					
					var labelConfigModelUnselected_CL = cfgMain_CL.getDescendantOfName("labelConfigModelUnselected_CL");
                    labelConfigModelUnselected_CL.setText(LoggingConfig.getExternalString("labTxtModelUnselected_CL"), true);

					
					var cfgViewMain_CL = tibco.admin.Main.getServer().getJSXByName("cfgViewMain_CL");

					var labelConfigLogserviceName_CL = cfgViewMain_CL.getDescendantOfName("labelConfigLogserviceName_CL");
                    labelConfigLogserviceName_CL.setText(LoggingConfig.getExternalString("labTxtCfgName_CL"), true);

					var labelConfigJMS_CL = cfgViewMain_CL.getDescendantOfName("labelConfigJMS_CL");
                    labelConfigJMS_CL.setText(LoggingConfig.getExternalString("labTxtCfgJMS_CL"), true);

					var labelConfigQueue_CL = cfgViewMain_CL.getDescendantOfName("labelConfigQueue_CL");
                    labelConfigQueue_CL.setText(LoggingConfig.getExternalString("labTxtCfgQueue_CL"), true);

					var labelConfigDest_CL = cfgViewMain_CL.getDescendantOfName("labelConfigDest_CL");
                    labelConfigDest_CL.setText(LoggingConfig.getExternalString("labTxtCfgDest_CL"), true);					

					var labelConfigMaxSize_CL = cfgViewMain_CL.getDescendantOfName("labelConfigMaxSize_CL");
                    labelConfigMaxSize_CL.setText(LoggingConfig.getExternalString("labTxtCfgMaxSize_CL"), true);

					var labelConfigMaxIndex_CL = cfgViewMain_CL.getDescendantOfName("labelConfigMaxIndex_CL");
                    labelConfigMaxIndex_CL.setText(LoggingConfig.getExternalString("labTxtCfgMaxIndex_CL"), true);

					var labelConfigModel_CL = cfgViewMain_CL.getDescendantOfName("labelConfigModel_CL");
                    labelConfigModel_CL.setText(LoggingConfig.getExternalString("labTxtCfgModel_CL"), true);
					

                };

                LoggingConfig.prototype.getComponentPath = function() {
                    return "tibco/admin/enterpriseAssets/servers/loggingconfig/component.xml"
                };
				
				LoggingConfig.refreshConfigViewMode = function() {					
					tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfigService.callinitConfig();		
					
					LoggingConfig.isCreateOperation = false;

                };             
				
				LoggingConfig.refreshConfigEditMode = function() {
					tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfigService.callinitConfig();
					LoggingConfig.swithToEditMode();
				}

                LoggingConfig.refreshConfig = function() {
 				    var manageMain = tibco.admin.Main.getServer().getJSXByName("mgtMain_CL");
					var configMain = tibco.admin.Main.getServer().getJSXByName("cfgMain_CL");

					configMain.setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
					manageMain.setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);

					LoggingConfig.refreshManagement();
					
                };
				
				LoggingConfig.refreshManagement = function() {
					tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfigService.calllistLogservice();
					tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfigService.callgetResourceConfigurationsInEnterprise();

					tibco.admin.Main.getServer().getJSXByName("buttonMgtDelete_CL").setEnabled(jsx3.gui.Form.STATEDISABLED ,true);
					tibco.admin.Main.getServer().getJSXByName("buttonMgtModify_CL").setEnabled(jsx3.gui.Form.STATEDISABLED ,true);
					tibco.admin.Main.getServer().getJSXByName("buttonMgtSetDefault_CL").setEnabled(jsx3.gui.Form.STATEDISABLED ,true);
					tibco.admin.Main.getServer().getJSXByName("buttonMgtStart_CL").setEnabled(jsx3.gui.Form.STATEDISABLED ,true);
					tibco.admin.Main.getServer().getJSXByName("buttonMgtStop_CL").setEnabled(jsx3.gui.Form.STATEDISABLED ,true);

				}
                LoggingConfig.refreshConfigResponse = function() {

                    var selJDBCName_LGC = LoggingConfig.getServer().getJSXByName("selJDBCName_LGC");
                    var selEMSName_LGC = LoggingConfig.getServer().getJSXByName("selEMSName_LGC");
                    LoggingConfig.updateSelect(selJDBCName_LGC.getValue(), selEMSName_LGC.getValue());
                    LoggingConfig.updateLabelText(selJDBCName_LGC.getValue(), selEMSName_LGC.getValue());
                };

                LoggingConfig.prototype.buttonSelected = function() {
					
                    tibco.admin.enterpriseAssets.servers.loggingconfig.LoggingConfig.refreshConfig();
                }

			

				LoggingConfig.setElementForSaveOpt = function(service) {
					var doc = service.getOutboundDocument();  		
					
					var logservice = doc.selectSingleNode(".//jsx1:saveLogserviceRequest",LoggingConfig.SOAP_CONFIG_REQUEST);
					var dest = doc.createNode(jsx3.xml.Entity.TYPEELEMENT,"destination",LoggingConfig.SOAP_CONFIG_NAMESPACE);  
					dest.setValue(tibco.admin.Main.getServer().getJSXByName("selConfigDestNo_CL").getGroupValue());
					var jmsid = doc.selectSingleNode(".//jsx1:jmsid",LoggingConfig.SOAP_CONFIG_REQUEST);				
					logservice.insertBefore(dest,jmsid);	

					var modelList = doc.selectSingleNode(".//jsx1:modelList",LoggingConfig.SOAP_CONFIG_REQUEST); 
					if(modelList == null){
						modelList = doc.createNode(jsx3.xml.Entity.TYPEELEMENT,"jsx1:modelList",LoggingConfig.SOAP_CONFIG_NAMESPACE);    
						logservice.appendChild(modelList);
					}

					var cache = LoggingConfig.getServer().getCache().getDocument("configModelCatchId_CL"); 
					var records = cache.selectNodes(".//record"); 

					if(records.getLength() > 0)
					{
						for(var i = 0; i < records.getLength(); i++) {    
							var modelName = doc.createNode(jsx3.xml.Entity.TYPEELEMENT,"modelName",LoggingConfig.SOAP_CONFIG_NAMESPACE);    
							modelName.setValue(records.get(i).getAttribute("jsxtext"));    
							modelList.appendChild(modelName);		
						}						
					}else{
						//set default model name
						var modelName = doc.createNode(jsx3.xml.Entity.TYPEELEMENT,"modelName",LoggingConfig.SOAP_CONFIG_NAMESPACE);    
						modelName.setValue("BaseEventFormat");    
						modelList.appendChild(modelName);	
					}
					//alert("doc1:"+doc.getXML());
				}
			

				LoggingConfig.doBeforeRequest = function(service,flag) {	
					if(flag == "del"){						
						LoggingConfig.setLogServiceNameInSoap(service,"deleteLogserviceRequest");
					}else if(flag == "init"){						
						LoggingConfig.setLogServiceNameInSoap(service,"initConfigRequest");
					}else if(flag == "start"){
						LoggingConfig.setLogServiceNameInSoap(service,"startLogserviceRequest");
					}else if(flag == "stop"){
						LoggingConfig.setLogServiceNameInSoap(service,"stopLogserviceRequest");
					}else if(flag == "save"){
						LoggingConfig.setElementForSaveOpt(service);
					}else if(flag == "setDefault"){
						LoggingConfig.setLogServiceNameInSoap(service,"setDefaultLogserviceRequest");
					}
				};
				
				LoggingConfig.setLogServiceNameInSoap = function(service,nodeName) {					
					var doc = service.getOutboundDocument();  
					var nodeInitConfigResponse = doc.selectSingleNode(".//jsx1:"+nodeName, LoggingConfig.SOAP_CONFIG_REQUEST);
					var logServiceName = doc.createNode(jsx3.xml.Entity.TYPEELEMENT,"logserviceName",LoggingConfig.SOAP_CONFIG_NAMESPACE);  
					logServiceName.setValue(LoggingConfig.currentLogserviceId);			
					nodeInitConfigResponse.appendChild(logServiceName);

				};

				LoggingConfig.printFormatMessage = function(titleName,msgName,errorMessage) {
										
					var alertTitle = LoggingConfig.getExternalString(titleName);
					var alertStr = LoggingConfig.getExternalString(msgName);
					if(errorMessage != null){
						alertStr = alertStr+errorMessage;
					}
					tibco.admin.Main.alert(alertTitle,alertStr);
				};

						
				LoggingConfig.checkNumber = function(obj)  {
					 if (!/^\d+$/.test(obj)) { 
						 LoggingConfig.printFormatMessage("msgCheckServErrTitle", "msgCheckNumberMessage_CL" ,null);
						 return false;  
					}
					return true;
				};

				LoggingConfig.checkString = function(obj,columnName)  {
					if(columnName == "File"){
						if(obj.length > 400)  {   						
						 LoggingConfig.printFormatMessage("msgCheckServErrTitle", "msgCheckStringLengthMessage_CL" ,columnName);
						 return false;   
						}
					}else if(columnName == "Name"){
						if(obj.length > 185)  {   						
						 LoggingConfig.printFormatMessage("msgCheckServErrTitle", "msgCheckStringLengthMessage_CL" ,columnName);
						 return false;   
						}
					}else if(columnName == "Queue Name"){
						if(obj.length > 185)  {   						
						 LoggingConfig.printFormatMessage("msgCheckServErrTitle", "msgCheckStringLengthMessage_CL" ,columnName);
						 return false;   
						}
					}				  					 

					 if(/^([a-zA-Z0-9]|[._-]|[:/\\])+$/.test( obj )) {   						 
						  return true; 
					 }else{						 
						 LoggingConfig.printFormatMessage("msgCheckServErrTitle", "msgCheckStringMessage_CL" , columnName );
						 return false;  
					 }
					    
				};




            });


		

}